package com.mercury.model;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @author ：tx
 * @description：
 * @date ：Created in 2019/1/26 17:20
 * @modified By：
 * @version:
 */
public class User {
    private long id;

    @NotNull
    @Size(min = 2,max = 10,message = "{userName.message}")
    private String userName;
    @NotNull
    private String age;
    private Date birthday;

    public User() {
    }

    public User(String userName, String age) {
        this.userName = userName;
        this.age = age;
    }

    public User(long id, String userName, String age) {
        this.id = id;
        this.userName = userName;
        this.age = age;
    }

    public User(String userName, Date birthday) {
        this.userName = userName;
        this.birthday = birthday;
    }

    public User(String userName, String age, Date birthday) {
        this.userName = userName;
        this.age = age;
        this.birthday = birthday;
    }

    public User(long id, String userName, String age, Date birthday) {
        this.id = id;
        this.userName = userName;
        this.age = age;
        this.birthday = birthday;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
}
